package com.zhuiYun.project.api.commodityType.mapper;
import com.zhuiYun.project.api.commodity.entity.Commodity;
import com.zhuiYun.project.api.commodityType.entity.CommodityType;
import com.zhuiYun.project.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName CommodityTypeMapper
 * @Description TODO
 * Author 高
 * @Date 2023/4/3 20:33
 * @Version 1.0
 **/
@Mapper
public interface CommodityTypeMapper extends BaseMapper<CommodityType> {

    //商品里的类型下拉框
    @Select("<script>select id,type_sname from commodity_small_type </script>")
    @Results({
            @Result(property="typeSname",column="type_sname"),
            @Result(property="id",column="id")
    })
    List<CommodityType> getCommodityType();

}

